Textual emotion detection systems may be designed to infer the underlying emotion associated with a text. Such systems may be employed in sentiment analysis, computer-assisted creativity, text-to-speech generation, human-computer interactions, and the like. Some conventional textual emotion detection systems may employ a keyword spotting technique. Keyword spotting techniques may include finding occurrences of predefined keywords within a text. The predefined keywords may be pre-associated with particular emotions. Thus, for example, a text may be associated with an emotion should a keyword associated with the emotion be found in the text. The keyword spotting may include word-based, line-based, and document-based keyword spotting.
In an example keyword spotting process, a textual input may be tokenized. Emotion words may be detected by matching the resulting tokens against a predefined set of words. The identified emotion words may be analyzed for their intensity. Furthermore, a negation check may determine whether a negative (e.g., “not”) is present in the text and an emotion class may be output.
In a modified approach, which may be described as a lexical affinity technique, a probabilistic affinity may be assigned to arbitrary words rather than detecting pre-defined emotional keywords. The probabilities may be assigned based on linguistic corpora.
The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one example technology area where some embodiments described herein may be practiced.